package Card;

import java.util.ArrayList;

public class Test {
    public static void main(String[] args) {
        Demo demo = new Demo();
        demo.buyCard();
        demo.shuffle();
        demo.showAllCard();

        //定义三个人
        ArrayList<ArrayList<Card>> list = new ArrayList<>();
        list.add(new ArrayList<>());
        list.add(new ArrayList<>());
        list.add(new ArrayList<>());

        //每个人发五张牌
        for (int i = 0; i < 3; i++) {
            for (int j = 0; j < 5; j++) {
                list.get(i).add(demo.cardList.get(0));
                demo.cardList.remove(0);
            }
        }

        System.out.println("剩余的牌:");
        System.out.println(demo.cardList);

        System.out.println("A的牌");
        System.out.println(list.get(0));

        System.out.println("B的牌");
        System.out.println(list.get(1));

        System.out.println("C的牌");
        System.out.println(list.get(2));
    }
}
